import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:qr_flutter/qr_flutter.dart';

class QRCodeWithText extends StatelessWidget {
  final String url;

  const QRCodeWithText({Key? key, required this.url}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: 300, // 容器宽度
      height: 400, // 容器高度
      color: Colors.grey[300], // 灰色背景
      padding: EdgeInsets.all(20),
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          // 文字部分
          Text(
            'Listen me on NCT',
            style: TextStyle(
              fontSize: 20,
              fontWeight: FontWeight.bold,
              color: Colors.black,
            ),
          ),
          SizedBox(height: 20), // 文字和二维码之间的间距
          // 二维码部分
          Container(
            child: QrImageView(
              data: "234567", // 二维码数据
              version: QrVersions.auto,
              size: 50, // 二维码大小
            ),
          ),
        ],
      ),
    );
  }
}